from net.pugsplace.gpremacy.rules import RuleProxy, UnitType
from net.pugsplace.gpremacy.rules import RuleConfiguration, Resource
from net.pugsplace.gpremacy.state import ResourceTuple

class RuleSet(RuleConfiguration):
   def initialize(self, proxy):
      proxy.setIdentifier("Test Configuration");
      proxy.addUnit(myUnit())

class ResourceImpl(Resource):
    name=""
    def __init__(self, n=""):
        name = n
    def getName(self):
        return name
      
brick = ResourceImpl("Brick")

class myUnit(UnitType):
   def getType(self):
      return "Ubermensch"
  
   def getBuildCost(self):
      return [ResourceTuple(brick, 5), ResourceTuple(ResourceImpl("NukularPower"), 1)];
  
   def getUpkeepCost(self):
      return [ResourceTuple(ResourceImpl("Pizza"), 2)];